﻿<phone:PhoneApplicationPage
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:System="clr-namespace:System;assembly=mscorlib"
    x:Class="JustinAngel.MindwaveSensor.WP8.TestApp.Standalone"
    mc:Ignorable="d"
	xmlns:chart="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Chart"
    xmlns:chartEngine="clr-namespace:Telerik.Charting;assembly=Telerik.Windows.Controls.Chart"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    shell:SystemTray.IsVisible="True">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
    	<VisualStateManager.VisualStateGroups>
    		<VisualStateGroup x:Name="ConnectionStates">
    			<VisualState x:Name="Connecting">
    				<Storyboard>
    					<DoubleAnimation Duration="0:0:0.3" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="button" d:IsOptimized="True"/>
    					<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="button">
    						<DiscreteObjectKeyFrame KeyTime="0:0:0.3">
    							<DiscreteObjectKeyFrame.Value>
    								<Visibility>Collapsed</Visibility>
    							</DiscreteObjectKeyFrame.Value>
    						</DiscreteObjectKeyFrame>
    					</ObjectAnimationUsingKeyFrames>
    					<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.IsHitTestVisible)" Storyboard.TargetName="button">
    						<DiscreteObjectKeyFrame KeyTime="0">
    							<DiscreteObjectKeyFrame.Value>
    								<System:Boolean>False</System:Boolean>
    							</DiscreteObjectKeyFrame.Value>
    						</DiscreteObjectKeyFrame>
    						<DiscreteObjectKeyFrame KeyTime="0:0:0.3">
    							<DiscreteObjectKeyFrame.Value>
    								<System:Boolean>True</System:Boolean>
    							</DiscreteObjectKeyFrame.Value>
    						</DiscreteObjectKeyFrame>
    					</ObjectAnimationUsingKeyFrames>
    					<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(TextBlock.Text)" Storyboard.TargetName="txtState">
    						<DiscreteObjectKeyFrame KeyTime="0" Value="Connecting"/>
    					</ObjectAnimationUsingKeyFrames>
    					<ColorAnimation Duration="0:0:0.3" To="#FFFFF973" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="ellipse" d:IsOptimized="True"/>
    				</Storyboard>
    			</VisualState>
    			<VisualState x:Name="Connected">
    				<Storyboard>
    					<ColorAnimation Duration="0:0:0.3" To="#FF9CFF73" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="ellipse" d:IsOptimized="True"/>
    					<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(TextBlock.Text)" Storyboard.TargetName="txtState">
    						<DiscreteObjectKeyFrame KeyTime="0" Value="Connected"/>
    					</ObjectAnimationUsingKeyFrames>
    					<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="button">
    						<DiscreteObjectKeyFrame KeyTime="0">
    							<DiscreteObjectKeyFrame.Value>
    								<Visibility>Collapsed</Visibility>
    							</DiscreteObjectKeyFrame.Value>
    						</DiscreteObjectKeyFrame>
    					</ObjectAnimationUsingKeyFrames>
    					<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="dataPanel">
    						<DiscreteObjectKeyFrame KeyTime="0:0:0.3">
    							<DiscreteObjectKeyFrame.Value>
    								<Visibility>Visible</Visibility>
    							</DiscreteObjectKeyFrame.Value>
    						</DiscreteObjectKeyFrame>
    					</ObjectAnimationUsingKeyFrames>
    					<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="dataPanel">
    						<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
    						<EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="1"/>
    					</DoubleAnimationUsingKeyFrames>
    					<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="btn_Switch">
    						<DiscreteObjectKeyFrame KeyTime="0">
    							<DiscreteObjectKeyFrame.Value>
    								<Visibility>Visible</Visibility>
    							</DiscreteObjectKeyFrame.Value>
    						</DiscreteObjectKeyFrame>
    					</ObjectAnimationUsingKeyFrames>
    					<DoubleAnimation Duration="0:0:0.3" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="btn_Switch" d:IsOptimized="True"/>
    				</Storyboard>
    			</VisualState>
    			<VisualState x:Name="LowQuality">
    				<Storyboard>
    					<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(TextBlock.Text)" Storyboard.TargetName="txtState">
    						<DiscreteObjectKeyFrame KeyTime="0" Value="Low Quality"/>
    					</ObjectAnimationUsingKeyFrames>
    					<ColorAnimation Duration="0:0:0.3" To="#FF7390FF" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="ellipse" d:IsOptimized="True"/>
    					<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="button">
    						<DiscreteObjectKeyFrame KeyTime="0">
    							<DiscreteObjectKeyFrame.Value>
    								<Visibility>Collapsed</Visibility>
    							</DiscreteObjectKeyFrame.Value>
    						</DiscreteObjectKeyFrame>
    					</ObjectAnimationUsingKeyFrames>
    					<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="dataPanel">
    						<DiscreteObjectKeyFrame KeyTime="0">
    							<DiscreteObjectKeyFrame.Value>
    								<Visibility>Visible</Visibility>
    							</DiscreteObjectKeyFrame.Value>
    						</DiscreteObjectKeyFrame>
    					</ObjectAnimationUsingKeyFrames>
    					<DoubleAnimation Duration="0:0:0.3" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="dataPanel" d:IsOptimized="True"/>
    					<DoubleAnimation Duration="0:0:0.3" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="btn_Switch" d:IsOptimized="True"/>
    					<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="btn_Switch">
    						<DiscreteObjectKeyFrame KeyTime="0">
    							<DiscreteObjectKeyFrame.Value>
    								<Visibility>Visible</Visibility>
    							</DiscreteObjectKeyFrame.Value>
    						</DiscreteObjectKeyFrame>
    					</ObjectAnimationUsingKeyFrames>
    				</Storyboard>
    			</VisualState>
    			<VisualState x:Name="NotConnected"/>
    		</VisualStateGroup>
    		<VisualStateGroup x:Name="DisplayGroup">
    			<VisualState x:Name="ShowChart">
    				<Storyboard>
    					<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="chartVisible">
    						<DiscreteObjectKeyFrame KeyTime="0">
    							<DiscreteObjectKeyFrame.Value>
    								<Visibility>Visible</Visibility>
    							</DiscreteObjectKeyFrame.Value>
    						</DiscreteObjectKeyFrame>
    					</ObjectAnimationUsingKeyFrames>
    					<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="chartVisible">
    						<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
    						<EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="1"/>
    					</DoubleAnimationUsingKeyFrames>
    					<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="dataVisible">
    						<DiscreteObjectKeyFrame KeyTime="0:0:0.3">
    							<DiscreteObjectKeyFrame.Value>
    								<Visibility>Collapsed</Visibility>
    							</DiscreteObjectKeyFrame.Value>
    						</DiscreteObjectKeyFrame>
    					</ObjectAnimationUsingKeyFrames>
    					<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="dataVisible">
    						<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
    						<EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0"/>
    					</DoubleAnimationUsingKeyFrames>
    					<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(ContentControl.Content)" Storyboard.TargetName="btn_Switch">
    						<DiscreteObjectKeyFrame KeyTime="0" Value="Data"/>
    					</ObjectAnimationUsingKeyFrames>
    				</Storyboard>
    			</VisualState>
    			<VisualState x:Name="ShowData">
    				<Storyboard>
    					<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="dataVisible">
    						<DiscreteObjectKeyFrame KeyTime="0">
    							<DiscreteObjectKeyFrame.Value>
    								<Visibility>Visible</Visibility>
    							</DiscreteObjectKeyFrame.Value>
    						</DiscreteObjectKeyFrame>
    					</ObjectAnimationUsingKeyFrames>
    					<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="dataVisible">
    						<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
    						<EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0.975"/>
    					</DoubleAnimationUsingKeyFrames>
    					<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="chartVisible">
    						<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
    						<EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0"/>
    					</DoubleAnimationUsingKeyFrames>
    					<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="chartVisible">
    						<DiscreteObjectKeyFrame KeyTime="0">
    							<DiscreteObjectKeyFrame.Value>
    								<Visibility>Visible</Visibility>
    							</DiscreteObjectKeyFrame.Value>
    						</DiscreteObjectKeyFrame>
    						<DiscreteObjectKeyFrame KeyTime="0:0:0.3">
    							<DiscreteObjectKeyFrame.Value>
    								<Visibility>Collapsed</Visibility>
    							</DiscreteObjectKeyFrame.Value>
    						</DiscreteObjectKeyFrame>
    					</ObjectAnimationUsingKeyFrames>
    					<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(ContentControl.Content)" Storyboard.TargetName="btn_Switch">
    						<DiscreteObjectKeyFrame KeyTime="0" Value="Chart"/>
    					</ObjectAnimationUsingKeyFrames>
    				</Storyboard>
    			</VisualState>
    		</VisualStateGroup>
    	</VisualStateManager.VisualStateGroups>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!-- LOCALIZATION NOTE:
            To localize the displayed strings copy their values to appropriately named
            keys in the app's neutral language resource file (AppResources.resx) then
            replace the hard-coded text value between the attributes' quotation marks
            with the binding clause whose path points to that string name.

            For example:

                Text="{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}"

            This binding points to the template's string resource named "ApplicationTitle".

            Adding supported languages in the Project Properties tab will create a
            new resx file per language that can carry the translated values of your
            UI strings. The binding in these examples will cause the value of the
            attributes to be drawn from the .resx file that matches the
            CurrentUICulture of the app at run time.
         -->

        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="10,0,14,0">
        	<Grid.RowDefinitions>
        		<RowDefinition Height="97*"/>
        		<RowDefinition Height="671*"/>
        	</Grid.RowDefinitions>
            <TextBlock x:Name="txtState" Margin="52,14,0,30" Style="{StaticResource PhoneTextLargeStyle}" TextWrapping="Wrap" Text="Not Connected"/>
        	<Button x:Name="button" Content="Connect" Click="ConnectToMindset" Margin="294,1,0,21" />
        	<Grid x:Name="dataVisible" Grid.Row="1">
        		<StackPanel x:Name="dataPanel" Orientation="Vertical" Opacity="0">
        			<Grid Height="72" Margin="0,-5,0,0">
        				<TextBlock HorizontalAlignment="Left" Height="36" Margin="3,40,0,0" Style="{StaticResource PhoneTextNormalStyle}" TextWrapping="Wrap" Text="Lorem Ipsum" VerticalAlignment="Top" Width="290">
        					<TextBlock.Foreground>
        						<SolidColorBrush Color="{StaticResource PhoneSubtleColor}"/>
        					</TextBlock.Foreground>
        				</TextBlock>
        				<TextBlock HorizontalAlignment="Left" Height="58" Margin="0,3,0,0" Style="{StaticResource PhoneTextLargeStyle}" TextWrapping="Wrap" Text="Delta waves" VerticalAlignment="Top" Width="293"/>
        				<TextBlock Text="{Binding Delta}" x:Name="txtDelta" HorizontalAlignment="Left" Height="72" Margin="294,0,0,0" Style="{StaticResource PhoneTextLargeStyle}" TextWrapping="Wrap" VerticalAlignment="Top" Width="162"/>
        			</Grid>
        			<Grid Height="72" Margin="0,-5,0,0">
        				<TextBlock HorizontalAlignment="Left" Height="36" Margin="3,40,0,0" Style="{StaticResource PhoneTextNormalStyle}" TextWrapping="Wrap" Text="Lorem Ipsum" VerticalAlignment="Top" Width="290">
        					<TextBlock.Foreground>
        						<SolidColorBrush Color="{StaticResource PhoneSubtleColor}"/>
        					</TextBlock.Foreground>
        				</TextBlock>
        				<TextBlock HorizontalAlignment="Left" Height="58" Margin="0,3,0,0" Style="{StaticResource PhoneTextLargeStyle}" TextWrapping="Wrap" Text="Theta waves" VerticalAlignment="Top" Width="293"/>
        				<TextBlock Text="{Binding Theta}" x:Name="txtTheta" HorizontalAlignment="Left" Height="72" Margin="294,0,0,0" Style="{StaticResource PhoneTextLargeStyle}" TextWrapping="Wrap" VerticalAlignment="Top" Width="162"/>
        			</Grid>
        			<Grid Height="72" Margin="0,-5,0,0">
        				<TextBlock HorizontalAlignment="Left" Height="36" Margin="3,40,0,0" Style="{StaticResource PhoneTextNormalStyle}" TextWrapping="Wrap" Text="Lorem Ipsum" VerticalAlignment="Top" Width="290">
        					<TextBlock.Foreground>
        						<SolidColorBrush Color="{StaticResource PhoneSubtleColor}"/>
        					</TextBlock.Foreground>
        				</TextBlock>
        				<TextBlock HorizontalAlignment="Left" Height="58" Margin="0,3,0,0" Style="{StaticResource PhoneTextLargeStyle}" TextWrapping="Wrap" Text="Alpha (low) waves" VerticalAlignment="Top" Width="293"/>
        				<TextBlock x:Name="txtAlphaLow" Text="{Binding AlphaLow}" HorizontalAlignment="Left" Margin="294,0,0,0" Style="{StaticResource PhoneTextLargeStyle}" TextWrapping="Wrap" Width="162"/>
        			</Grid>
        			<Grid Height="72" Margin="0,-5,0,0">
        				<TextBlock HorizontalAlignment="Left" Height="36" Margin="3,40,0,0" Style="{StaticResource PhoneTextNormalStyle}" TextWrapping="Wrap" Text="Lorem Ipsum" VerticalAlignment="Top" Width="290">
        					<TextBlock.Foreground>
        						<SolidColorBrush Color="{StaticResource PhoneSubtleColor}"/>
        					</TextBlock.Foreground>
        				</TextBlock>
        				<TextBlock HorizontalAlignment="Left" Height="58" Margin="0,3,0,0" Style="{StaticResource PhoneTextLargeStyle}" TextWrapping="Wrap" Text="Alpha (high) waves" VerticalAlignment="Top" Width="293"/>
        				<TextBlock x:Name="txtAlphaHigh" Text="{Binding AlphaHigh}" HorizontalAlignment="Left" Height="72" Margin="294,0,0,0" Style="{StaticResource PhoneTextLargeStyle}" TextWrapping="Wrap" VerticalAlignment="Top" Width="162"/>
        			</Grid>
        			<Grid Height="72" Margin="0,-5,0,0">
        				<TextBlock HorizontalAlignment="Left" Height="36" Margin="3,40,0,0" Style="{StaticResource PhoneTextNormalStyle}" TextWrapping="Wrap" Text="Lorem Ipsum" VerticalAlignment="Top" Width="290">
        					<TextBlock.Foreground>
        						<SolidColorBrush Color="{StaticResource PhoneSubtleColor}"/>
        					</TextBlock.Foreground>
        				</TextBlock>
        				<TextBlock HorizontalAlignment="Left" Height="58" Margin="0,3,0,0" Style="{StaticResource PhoneTextLargeStyle}" TextWrapping="Wrap" Text="Beta (low) waves" VerticalAlignment="Top" Width="293"/>
        				<TextBlock x:Name="txtBetaLow" Text="{Binding BetaLow}"  HorizontalAlignment="Left" Height="72" Margin="294,0,0,0" Style="{StaticResource PhoneTextLargeStyle}" TextWrapping="Wrap" VerticalAlignment="Top" Width="162"/>
        			</Grid>
        			<Grid Height="72" Margin="0,-5,0,0">
        				<TextBlock HorizontalAlignment="Left" Height="36" Margin="3,40,0,0" Style="{StaticResource PhoneTextNormalStyle}" TextWrapping="Wrap" Text="Lorem Ipsum" VerticalAlignment="Top" Width="290">
        					<TextBlock.Foreground>
        						<SolidColorBrush Color="{StaticResource PhoneSubtleColor}"/>
        					</TextBlock.Foreground>
        				</TextBlock>
        				<TextBlock HorizontalAlignment="Left" Height="58" Margin="0,3,0,0" Style="{StaticResource PhoneTextLargeStyle}" TextWrapping="Wrap" Text="Beta (high) waves" VerticalAlignment="Top" Width="293"/>
        				<TextBlock x:Name="txtBetaHigh" Text="{Binding BetaHigh}"   HorizontalAlignment="Left" Height="72" Margin="294,0,0,0" Style="{StaticResource PhoneTextLargeStyle}" TextWrapping="Wrap" VerticalAlignment="Top" Width="162"/>
        			</Grid>
        			<Grid Height="72" Margin="0,-5,0,0">
        				<TextBlock HorizontalAlignment="Left" Height="36" Margin="3,40,0,0" Style="{StaticResource PhoneTextNormalStyle}" TextWrapping="Wrap" Text="Lorem Ipsum" VerticalAlignment="Top" Width="290">
        					<TextBlock.Foreground>
        						<SolidColorBrush Color="{StaticResource PhoneSubtleColor}"/>
        					</TextBlock.Foreground>
        				</TextBlock>
        				<TextBlock HorizontalAlignment="Left" Height="58" Margin="0,3,0,0" Style="{StaticResource PhoneTextLargeStyle}" TextWrapping="Wrap" Text="Gamma (low) waves" VerticalAlignment="Top" Width="293"/>
        				<TextBlock x:Name="txtGammaLow" Text="{Binding GammaLow}"   HorizontalAlignment="Left" Height="72" Margin="294,0,0,0" Style="{StaticResource PhoneTextLargeStyle}" TextWrapping="Wrap" VerticalAlignment="Top" Width="162"/>
        			</Grid>
        			<Grid Height="72" Margin="0,-5,0,0">
        				<TextBlock HorizontalAlignment="Left" Height="36" Margin="3,40,0,0" Style="{StaticResource PhoneTextNormalStyle}" TextWrapping="Wrap" Text="Lorem Ipsum" VerticalAlignment="Top" Width="290">
        					<TextBlock.Foreground>
        						<SolidColorBrush Color="{StaticResource PhoneSubtleColor}"/>
        					</TextBlock.Foreground>
        				</TextBlock>
        				<TextBlock HorizontalAlignment="Left" Height="58" Margin="0,3,0,0" Style="{StaticResource PhoneTextLargeStyle}" TextWrapping="Wrap" Text="Gamma (mid) waves" VerticalAlignment="Top" Width="293"/>
        				<TextBlock x:Name="txtGammaMid" Text="{Binding GammaMid}" HorizontalAlignment="Left" Height="72" Margin="294,0,0,0" Style="{StaticResource PhoneTextLargeStyle}" TextWrapping="Wrap" VerticalAlignment="Top" Width="162"/>
        			</Grid>
        			<Grid Height="72" Margin="0,-5,0,0">
        				<TextBlock HorizontalAlignment="Left" Height="36" Margin="3,40,0,0" Style="{StaticResource PhoneTextNormalStyle}" TextWrapping="Wrap" Text="Lorem Ipsum" VerticalAlignment="Top" Width="290">
        					<TextBlock.Foreground>
        						<SolidColorBrush Color="{StaticResource PhoneSubtleColor}"/>
        					</TextBlock.Foreground>
        				</TextBlock>
        				<TextBlock HorizontalAlignment="Left" Height="58" Margin="0,3,0,0" Style="{StaticResource PhoneTextLargeStyle}" TextWrapping="Wrap" Text="Attention (0-100)" VerticalAlignment="Top" Width="293"/>
        				<TextBlock  x:Name="txtAttention" Text="{Binding eSenseAttention}"  HorizontalAlignment="Left" Height="72" Margin="294,0,0,0" Style="{StaticResource PhoneTextLargeStyle}" TextWrapping="Wrap" VerticalAlignment="Top" Width="162"/>
        			</Grid>
        			<Grid Height="72" Margin="0,-5,0,0">
        				<TextBlock HorizontalAlignment="Left" Height="36" Margin="3,40,0,0" Style="{StaticResource PhoneTextNormalStyle}" TextWrapping="Wrap" Text="Lorem Ipsum" VerticalAlignment="Top" Width="290">
        					<TextBlock.Foreground>
        						<SolidColorBrush Color="{StaticResource PhoneSubtleColor}"/>
        					</TextBlock.Foreground>
        				</TextBlock>
        				<TextBlock HorizontalAlignment="Left" Height="58" Margin="0,3,0,0" Style="{StaticResource PhoneTextLargeStyle}" TextWrapping="Wrap" Text="Meditation (0-100) " VerticalAlignment="Top" Width="293"/>
        				<TextBlock  x:Name="txtMeditation" Text="{Binding eSenseMeditation}"  HorizontalAlignment="Left" Height="72" Margin="294,0,0,0" Style="{StaticResource PhoneTextLargeStyle}" TextWrapping="Wrap" VerticalAlignment="Top" Width="162"/>
        			</Grid>
        		</StackPanel>
        	</Grid>
        	<Grid x:Name="chartVisible" Grid.Row="1" Background="Black" Visibility="Collapsed" Opacity="0">
        		<chart:RadCartesianChart x:Name="chart">
        			<chart:RadCartesianChart.Grid>
        				<chart:CartesianChartGrid MajorXLineDashArray="5, 5" MajorYLineDashArray="5, 5" MajorLinesVisibility="XY">
        				</chart:CartesianChartGrid>
        			</chart:RadCartesianChart.Grid>
					<chart:RadCartesianChart.HorizontalAxis>
        				<chart:DateTimeCategoricalAxis Visibility="Collapsed" DateTimeComponent="Second"  LineStroke="{StaticResource PhoneDisabledBrush}" LineThickness="2"/>
        			</chart:RadCartesianChart.HorizontalAxis>
					<chart:RadCartesianChart.VerticalAxis>
        				<chart:LinearAxis LineStroke="{StaticResource PhoneDisabledBrush}" LineThickness="2"/>
        			</chart:RadCartesianChart.VerticalAxis>
        			<chart:LineSeries Stroke="Red" CombineMode="Stack" />
        			<chart:LineSeries Stroke="Blue" CombineMode="Stack" />
        			<chart:LineSeries Stroke="Green" CombineMode="Stack" />
        			<chart:LineSeries Stroke="Yellow" CombineMode="Stack" />
        			<chart:LineSeries Stroke="Orange" CombineMode="Stack" />
        			<chart:LineSeries Stroke="Purple" CombineMode="Stack" />
        			<chart:LineSeries Stroke="White" CombineMode="Stack" />
        			<chart:LineSeries Stroke="Gray" CombineMode="Stack" />
</chart:RadCartesianChart>
			</Grid>
        	<Button x:Name="btn_Switch" Click="btn_Switch_Click_1" Content="Chart" HorizontalAlignment="Left" Height="76" Margin="294,0,0,0" VerticalAlignment="Top" Width="162" Visibility="Collapsed" Opacity="0"/>
        </Grid>
        <Ellipse x:Name="ellipse" Fill="#FFFF7373" HorizontalAlignment="Left" Height="44" Margin="10,14,0,0" Grid.RowSpan="2" VerticalAlignment="Top" Width="44" StrokeThickness="0"/>

        <!--Uncomment to see an alignment grid to help ensure your controls are
            aligned on common boundaries.  The image has a top margin of -32px to
            account for the System Tray. Set this to 0 (or remove the margin altogether)
            if the System Tray is hidden.

            Before shipping remove this XAML and the image itself.-->
        <!--<Image Source="/Assets/AlignmentGrid.png" VerticalAlignment="Top" Height="800" Width="480" Margin="0,-32,0,0" Grid.Row="0" Grid.RowSpan="2" IsHitTestVisible="False" />-->
    </Grid>

</phone:PhoneApplicationPage>